#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QCamera>
#include <QCameraInfo>
#include <QCameraImageCapture>
#include <QTimer>
#include "QZXing.h"
#include <QLabel>
#include <QMovie>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButton_clear_clicked();

    void on_pushButton_timestamp_clicked();

    void on_pushButton_time_clicked();

    void on_pushButton_curtimestamp_clicked();

    void on_pushButton_make_clicked();

    void on_pushButton_make_2_clicked();

    void on_pushButton_make_3_clicked();

    void UISetInit();

    void on_pushButton_addpicture_clicked();

    void on_pushButton_change_clicked();

    void on_pushButton_openfile_clicked();

    void on_pushButton_makeQR_clicked();

    void on_pushButton_saveQR_clicked();

    void on_pushButton_addQR_clicked();

    void on_pushButton_analysisQR_clicked();

    void on_pushButton_scanQR_clicked();

    void processFrame(int requestId, const QImage &img);

    void on_pushButton_exitQR_clicked();

private:
    Ui::MainWindow *ui;
    QZXing qrCodeEncoder;
    QCamera *camera;
    QCameraImageCapture *imageCapture;
    QTimer *capturetimer;
    QMovie *movie;
};
#endif // MAINWINDOW_H
